package com.example.annealing.common.exception;


import com.example.annealing.common.web.IErrorCode;
import lombok.experimental.UtilityClass;

/**
 * 断言处理类，用于抛出各种API异常
 *
 * @author Gene
 * @date 2020/2/27
 */
@UtilityClass
public class Asserts {
    public void fail(String message) {
        throw new ApiException(message);
    }

    public void fail(IErrorCode errorCode) {
        throw new ApiException(errorCode);
    }
}
